package net.toocruel.iqismart.service.core;

import net.toocruel.iqismart.entity.core.Exchange;
import net.toocruel.iqismart.entity.core.Good;
import net.toocruel.iqismart.security.core.support.Result;
import net.toocruel.iqismart.service.dto.GoodsExchangeDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.validation.BindingResult;

import javax.validation.Valid;
import java.util.List;

/**
 * @Description
 * @Auther sty
 * @createTime 2018/5/15 下午6:36
 */
public interface GoodService {
    Page<Good> findAll(PageRequest pageRequest);

    List<Exchange> getExchanges(int i);

    Good findById(Long id);

    Result exchange(@Valid GoodsExchangeDTO exchangeDTO, BindingResult bindingResult);
}
